package com.daxue.nacosprovider;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

@Component
public class KafkaConsumer {

    @KafkaListener(topics = "test", groupId = "1", topicPattern = "0")
    public void receive(String message) {
        System.out.println("接收到的消息为：" + message);
    }
}